<div class="card">
	<g:formRemote name="trade" controler="turn" update="actionPanel"
		url="${[action:'executeCard']}" after="${remoteFunction(controller:'game', action:'reloadExchangePanel',update:'exchangePanelContent')};${remoteFunction(controller:'game', action:'reloadPlayerInfo',update:'playerInfoContent')}">
		<table class="table table-bordered table-condensed">
			<thead>
				<tr>
					<th colspan="2">
						${message(code: 'card.label', default: 'Card')} (${card.id})
					</th>
				</tr>
			</thead>
			<tbody>
				<g:hiddenField name="card.id" value="${card.id}"/>
				<g:each in="${card.modifications}" status="i" var="modification">
					<tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
						<td><nobr>
								${modification.operation + " " + modification.amount}
							</nobr></td>
						<td>
							<g:hiddenField name="modification.${i}.id" value="${modification.id}" />
							<g:if test="${modification.share == null}">
								<g:select class="input-small" name="modification.${i}.share" from="${shareList}" noSelection="['null': '']"></g:select>
							</g:if> <g:else>
								<g:hiddenField name="modification.${i}.share" value="${modification.share}" />
								${modification.share}
							</g:else></td>
					</tr>
				</g:each>
			</tbody>
		</table>
		<g:actionSubmit class="btn btn-large btn-primary" value="OK" action="executeCard"></g:actionSubmit><br />
		<g:remoteLink class="btn btn-large" action="selectCard" update="actionPanel">
			Back
		</g:remoteLink>
	</g:formRemote>
</div>